﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace HRSystem
{
    class CButton:Button
    {
        public CButton()
            : base()
        {
            this.FlatStyle = FlatStyle.Flat;//样式
            this.ForeColor = Color.Transparent;//前景
            this.BackColor = Color.Transparent;//去背景
            this.FlatAppearance.BorderSize = 0;//去边线
            this.FlatAppearance.MouseOverBackColor = Color.Transparent;//鼠标经过
            this.FlatAppearance.MouseDownBackColor = Color.Transparent;//鼠标按下
            this.Cursor = Cursors.Hand;
        }

        protected override void OnMouseHover(EventArgs e)
        {
            base.OnMouseHover(e);
            this.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
         //  
        }

        protected override void OnMouseLeave(EventArgs e)
        {
            base.OnMouseLeave(e);
            this.Font = new System.Drawing.Font(this.Font, FontStyle.Regular);
        }
    }
}
